#ifndef _INK_SCREEN_PLATFORM_IO_H_
#define _INK_SCREEN_PLATFORM_IO_H_

#include "driver/gpio.h"

typedef enum
{
    INK_SCREEN_GPIO_MODE_INPUT,
    INK_SCREEN_GPIO_MODE_OUTPUT,
}ink_screen_gpio_mode_t;

// 引脚定义
#define EPD_MOSI_PIN GPIO_NUM_1
#define EPD_SCLK_PIN GPIO_NUM_2
#define EPD_CS_PIN GPIO_NUM_3
#define EPD_DC_PIN GPIO_NUM_4
#define EPD_RST_PIN GPIO_NUM_5
#define EPD_BUSY_PIN GPIO_NUM_6
#define EPD_PWR_PIN GPIO_NUM_7

#define ink_screen_digital_write(_pin, _value) gpio_set_level(_pin, _value)
#define ink_screen_digital_read(_pin) gpio_get_level(_pin)

void ink_screen_gpio_mode(gpio_num_t gpio, uint8_t mode);
void ink_screen_delay_ms(uint32_t ms);
void ink_screen_spi_init(void);
void ink_screen_spi_write_bytes(uint8_t *data, uint32_t len);
// void ink_screen_digital_write(gpio_num_t pin, uint8_t value);
// uint8_t ink_screen_digital_read(gpio_num_t pin);

#endif // _INK_SCREEN_PLATFORM_IO_H_